package com.gxa.common;

import org.springframework.stereotype.Component;

/**
 * 返回数据
 */

public class R<T> {
    private Integer code; //返回的状态码
    private String msg; //返回提示信息
    private T data; //带回数据：map  list  entity ..........

    public R() {
    }

    public R(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public R(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
